<?php

class LzTestClass
{
    public
    function __construct($class)
    {
        $testClass  = $class . '__Test';
        if (!class_exists($testClass))
            eval(sprintf('class %s extends %s {
                public function _test__call($name, $args) {
                    return call_user_func_array(array($this, $name), $args);
                }
                public function _test__set($name, $val) {
                    $this->$name = $val;
                }
                public function _test__get($name) {
                    return $this->$name;
                }
            }', $testClass, $class));

        $this->obj  = new $testClass;

    }


    public
    function __call($name, $args)
    {
        return $this->obj->_test__call($name, $args);
    }


    public
    function __set($name, $val)
    {
        $this->obj->_test__set($name, $val);
    }


    public
    function __get($name)
    {
        return $this->obj->_test__get($name);
    }

    protected $obj;
}

